Below are programs that are mostly done, but are either missing pieces of code, or there is a typo, or any other kind of error. Your task is to fix the program so it would compile.

1. Difficulty: Easy
//**CODE THAT IS MISSING WILL BE REPLACED BY "??"**
//There may be other errors that are not marked (ex: missing a semicolon)
 
 
import greenfoot.*;
 
//Turtle that runs in circles
 
public class CircleTurtle extends Turtle
{
    private ?? speed;
    private ?? turnRate;
    private ?? isClockwise;
 
    public CircleTurtle()
    {
        speed = 5;
        turnRate = 2;
        isClockwise = true;
        penDown();
    }
    public int getSpeed( //Find how fast the turtle is moving
    {
        ?? speed;
    }
    void isClockwise() //Makes the turtle switch directions
    {
        isClockwise = ??isClockwise
 
    public void act()
    {
        move(5);
        if(isClockwise)
            turn(2);
        ??
            turn( ?? 2);
    }
 
}
2. difficulty: easy

// *******************************************************************
//   RightTriangle.java
//
//   Compute the length of the hypotenuse of a right triangle
//   given the lengths of the sides
// *******************************************************************
import java.util.???????;
 
public class RightTriangle
{
   public static void main (String[] args)
   {
      double side1, side2  // lengths of the sides of a right triangle
      double hypotenuse    // length of the hypotenuse
 
       ??????? scan = ??? Scanner(System.in);
 
      // Get the lengths of the sides as input
      System.out.print ("Please enter the lengths of the two sides of " +
                          "a right triangle (separate by a blank space): ");
 
      side1 = scan.???????()    //a
 
      side2 = ????.nextInt()    //b
 
      // Compute the length of the hypotenuse
 
      hypotenuse = Math.sqrt(Math.pow(?????, 2) + Math.pow(side2, 2))    //c
 
      // Print the result
      System.out.println ("Length of the hypotenuse: " + hypotenuse)
    }
}